import request from "@/utils/request";
export const getExceptionTopo = (params) => {
  return request.get('/exception/get/topology', {params})
}

export const getExceptionChartsData = (params) => {
  return request.post('/exception/cluster', params);
}
// 活跃会话数
export const querySessionCountLine = (params, type) => {
  return request.post(`/k8s-${type}/activeConnect/line`, params);
};
// 0窗口
export const queryZeroWindowLine = (params, type) => {
  return request.post(`/k8s-${type}/zeroWindow/line`, params);
};
// 发包数
export const querySendPackageLine = (params, type) => {
  return request.post(`/k8s-${type}/sendPackage/line`, params);
}
// 收包数
export const queryReceiverPackageLine = (params, type) => {
  return request.post(
      `/k8s-${type}/receiverPackage/line`,
      params
  );
};
export const getExceptionList = (params) => {
  return request.post('/exception/list', params);
}
// 请求耗时详情
export const getExceptionTimeData = (params) => {
  return request.get('/exception/time/detail', { params });
}

export const flameGraphData = (params) => {
  return request.post('/flame-graph/thread', params)
}
